<!DOCTYPE html>
<html>
<head>
    <title>周边门店</title>

    <% include common/meta.ejs %>
    <% include common/public.ejs %>
    <link href="<%= global.config.path.publicPath %>/custom/officialAccount/css/officalCommon.css" rel="stylesheet">
    <link href="<%= global.config.path.publicPath %><%= body.stylePath %>" rel="stylesheet">
    <style>
        .box-title {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 9999;
        }
        .store-list-title, .store-detail-title {
            text-align: center;
            margin-top: 20px;
        }
        body{
            background-color: #FBF9FE;
        }
        .store-list-item .store-address, .store-detail-item .store-address {
            color: #999;
        }
        .store-list-item, .store-detail-item {
            margin: 10px;
            padding: 5px;
            border-top: 1px solid #ccc;
            font-size: 14px;
            color: #666;
        }
        .store-list-item .store-other .distance, .store-detail-item .store-active {
            color: #ae2421;
            font-weight: 700;
        }
        .store-list-item .store-other .more {
            float: right;
            color: #e68f8f;
        }
    </style>
</head>
<body ontouchstart>
<div>
    <div class="store-list-container">
        <div class="store-list-title">
            <img src="<%=global.config.path.publicPath%>/images/storeListTitle.png" class="title-icon">
            您附近的门店
        </div>
        <%if(result.length!=0){%>
        <%if(limitNumber>result.length){
            limitNumber=result.length
        }
        for(let i=0;i<limitNumber;i++){%>
        <div class="store-list-item">
            <p class="store-title">
                <span><%=i+1%></span>
                <span><%=result[i].orgName%></span>
            </p>
            <p class="store-address">
                地址：<span><%=result[i].address%></span>
            </p>
            <p class="store-other" style="padding: 2px;">
                <span class="distance">
                     <a href="javascript:void(0);"><span style="color: #881b1b">【距离】</span></a>
                    <span><%=result[i].distence%></span>公里 </span>
                <a class="storeNumber" class="goDetail"  href="<%=global.config.path.contextPath%>/view/detail?orgCode=<%=result[i].orgCode%>&store=2"><span class="more" data-name="<%=result[i].orgName%>"  data-address="<%=result[i].address%>">查看更多</span></a>
            </p>
        </div>
        <%}%>
        <%}else{%>
        <div class="store-list-item">
          暂无附近门店
        </div>
        <%}%>
    </div>


</div>

<% include common/footer.ejs %>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    $('.more').click(function () {
        sessionStorage.setItem('orgName',$(this).data('name'))
        sessionStorage.setItem('address',$(this).data('address'))
    })

</script>


</body>
</html>
